package com.pk.serviceprovider;

public class ServiceMain {
    public static void main(String[] args) throws Exception {
        Services.registerProvider("service1", new Service1Provider());
        Services.registerProvider("service2", new Service2Provider());

        Service service1 = Services.newInstance("service1");
        service1.doService();

        Service service2 = Services.newInstance("service2");
        service2.doService();

        Service serviceDefault = Services.newInstance();
        serviceDefault.doService();

        System.out.println("service main...");
    }
}
